% EEG Data PreProcessing
% 
% digested the Seizure and Artifact section data only
% Channel 14 is bad. 
% Channel 13 has about 20 seconds of artifact at 5972 second
% There is a seizure is at 18802 seconds
% 
load Pt1_DMA02_macro1-24_100Hz; 
n_seizure = 1880200;
mx_seizure_2hr = data(:, (1880200-720000) : (1880200+720000));
save mx_seizure_2hr mx_seizure_2hr;
clear mx_seizure_2hr;
mx_seizure_30min = data(:, (1880200-180000) : (1880200+180000));
save mx_seizure_30min mx_seizure_30min;
mx_seizure_10min = data(:, (1880200-60000) : (1880200+60000));
save mx_seizure_10min mx_seizure_10min;
mx_seizure_60sec = data(:, (1880200-6000) : (1880200+6000));
save mx_seizure_60sec mx_seizure_60sec;
mx_seizure_10sec = data(:, (1880200-1000) : (1880200+1000));
save mx_seizure_10sec mx_seizure_10sec;
mx_seizure_8192 = data(:, (n_seizure-4096) : (n_seizure+4095));
save mx_seizure_8192 mx_seizure_8192;

n_artifact = 597200;
mx_artifact_60sec = data(:, (597200-6000) : (597200+6000));
save mx_artifact_60sec mx_artifact_60sec;
mx_artifact_4096 = data(:, (n_artifact-2048) : (n_artifact+2047));
save mx_artifact_4096 mx_artifact_4096;

% experiment section
load mx_seizure_8192;
v6 = double(mx_seizure_8192(6,:));

load c6;
s = double(c6);
n_seizure = 1880200;
n_sec = 100;
n_window = 100; % sec
sw = s(n_seizure-n_sec*100 : n_seizure+n_sec*100);




